:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #495057;
    --muted-color: #6c757d;
    --income-color: #10b981;
    --expense-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f7ff 0%, #e6e9ff 100%);
    color: var(--text-color);
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 40px;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.back-btn {
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
    text-decoration: none;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.header-title {
    font-weight: 600;
    font-size: 1.3rem;
    margin: 0;
    text-align: center;
    flex: 1;
}

.action-btn {
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
    cursor: pointer;
}

.action-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.container-custom {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 表格样式 */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.transactions-table th {
    background-color: rgba(67, 97, 238, 0.05);
    color: var(--muted-color);
    font-weight: 600;
    text-align: left;
    padding: 15px 20px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.transactions-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.transactions-table tbody tr {
    transition: all 0.3s ease;
}

.transactions-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

.transaction-name {
    font-weight: 600;
    color: var(--dark-color);
}

.transaction-date {
    color: var(--muted-color);
    font-size: 0.9rem;
    margin-top: 5px;
}

.transaction-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.type-income {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--income-color);
}

.type-expense {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--expense-color);
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.05rem;
}

.income-amount {
    color: var(--income-color);
}

.expense-amount {
    color: var(--expense-color);
}

.btn-detail {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-detail:hover {
    background: rgba(67, 97, 238, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(67, 97, 238, 0.15);
}

.loading-container {
    text-align: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(67, 97, 238, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--muted-color);
    font-size: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    background: white;
}

.pagination-btn {
    background: white;
    color: var(--primary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.pagination-btn:hover {
    background: rgba(67, 97, 238, 0.1);
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn i {
    margin: 0 5px;
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--muted-color);
    font-size: 13px;
}

.btn-refresh {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

@media (max-width: 768px) {

    .transactions-table {
        display: block;
        overflow-x: auto;
    }

    .transactions-table th,
    .transactions-table td {
        padding: 12px 15px;
    }

    .transactions-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .header-content {
        padding: 0 15px;
    }

    .transactions-table {
        min-width: 600px;
    }
}